import React from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom'
import { Home, Login, Detail } from './pages'


function App() {
  return (
    <div className="App">
      <BrowserRouter>
        <Switch>
          <Route exact path="/" component={Home}></Route>
          <Route path="/login" component={Login}></Route>
          <Route path="/detail/:id" component={Detail}></Route>
          <Route render={() => <h1>404 页面找不到了</h1>}></Route>
        </Switch>
      </BrowserRouter>
    </div>
  );
}

export default App;
